package com.automannn.dubbo.provider;

import com.automannn.dubbo.api.HelloService;
import com.automannn.dubbo.bean.MyDTO;
import org.apache.dubbo.config.annotation.DubboService;

/**
 * @author automannn
 * @time 2021/7/28
 */
@DubboService
/*springBoot环境需要使用此注解*/
public class HelloServiceImpl implements HelloService {
    @Override
    public void sayHello(String name) {
        System.out.println("==============sayHello 微服务调用=================");
        System.out.println("hello,"+name);
    }

    @Override
    public void sayHi(String name) {
        System.out.println("==============sayHi 微服务调用=================");
        System.out.println("hi,"+name);
    }

    @Override
    public String invokeBean(MyDTO myDTO) {
        System.out.println("==============invokeBean 微服务调用=================");
        System.out.println("invoke bean:"+myDTO.toString());
        return "invoke success:"+myDTO.toString();
    }
}
